import request from '@/utils/request'

// 查询串口Io定义列表
export function listSeriesIo(query) {
  return request({
    url: '/device/seriesIo/list',
    method: 'get',
    params: query
  })
}

// 查询串口Io定义详细
export function getSeriesIo(id) {
  return request({
    url: '/device/seriesIo/' + id,
    method: 'get'
  })
}

// 新增串口Io定义
export function addSeriesIo(data) {
  return request({
    url: '/device/seriesIo',
    method: 'post',
    data: data
  })
}

// 修改串口Io定义
export function updateSeriesIo(data) {
  return request({
    url: '/device/seriesIo',
    method: 'put',
    data: data
  })
}

// 删除串口Io定义
export function delSeriesIo(id) {
  return request({
    url: '/device/seriesIo/' + id,
    method: 'delete'
  })
}

// 获取传感器定义
export function seriesIoOptions(params) {
  return request({
    url: `/device/seriesIo/seriesIoOptions`,
    method: 'get',
    params:params
  })
}

// 创建子表
export function createSubTable(id) {
  return request({
    url: `/device/seriesIo/createSubTable/${id}`,
    method: 'get'
  })
}